package com.example.demo.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.relational.core.mapping.Table;

import java.util.Collections;
import java.util.List;

@Data
@Table("t_class")
public class SchoolClass {
    @Id
    private Long id ;
    private String name ;
    private Long grade ;

    @Transient
    List<SchoolStudent> students = Collections.emptyList();
}